package org.hengguan.api.contest.config;

import org.hengguan.api.contest.component.GlobalInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

	@Autowired
	private GlobalInterceptor globalInterceptor;
	
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(globalInterceptor).excludePathPatterns("/v2/**","/swagger-resources/**","/webjars/**","/swagger-ui.html","/doc.html","/favicon.ico");
	}
	
}
